﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="EDP.WebForm.school.student._default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <script type="text/javascript">
        document.onkeydown = function (e) {
            if (!e) e = window.event;
            if ((e.keyCode || e.which) == 13) {
                F.f_disable('panel_grid_List_ctl00_btn_query');
                __doPostBack('panel$grid_List$ctl00$btn_query', '');
            }
        }
    </script>
    <style type="text/css">
        .x-column-header {
            text-align: center;
        }
    </style>

    <form id="form1" runat="server">
        <f:PageManager ID="PageManager" AutoSizePanelID="panel" runat="server" />
        <f:HiddenField ID="hide_orgId" runat="server" />
        <f:HiddenField ID="hide_orgFullCode" runat="server" />
        <f:Panel ID="panel" runat="server" ShowBorder="false" Margin="10" Layout="Region">
            <Items>
                <f:Tree ID="tree_org" runat="server" Title="班级" Margin="0" Width="260" RegionPosition="Left" OnNodeCommand="tree_org_NodeCommand" />
                <f:Grid ID="grid_List" runat="server" Title="用户列表" DataKeyNames="ID" Margin="0 0 0 5" RegionPosition="Center" EnableCheckBoxSelect="false" SortField="Number" SortDirection="ASC"
                    OnPageIndexChange="grid_List_PageIndexChange" OnRowCommand="grid_List_RowCommand" OnSort="grid_List_Sort">
                    <Toolbars>
                        <f:Toolbar runat="server" ToolbarAlign="Right" QueryToolbar="true"> <%--QueryToolbar是否查询工具栏--%>
                            <Items>
                                <f:TextBox ID="tb1" runat="server" EmptyText="姓名/编号" QueryName="NumberNameKeywrod" Margin="0" Width="150" />
                                <f:Button ID="btn_query" runat="server" Text=" 查 询 " Icon="SystemSearch" Margin="0 0 0 10" OnClick="QueryClick" />
                                <f:ToolbarFill runat="server" />
                                <f:Button ID="btn_user_add" runat="server" Text="新增学生" Icon="Add" Margin="0 10 0 0" OnClick="btn_user_add_Click" />
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <Columns>
                        <f:BoundField DataField="Number" DataToolTipField="Number" Width="150" HeaderText="编号" />
                        <f:BoundField DataField="Name" DataToolTipField="Name" Width="70" HeaderText="姓名" />
                        <%-- 绑定的属性和排序的属性可以不一样,GenderDisplay为只读属性,不能在数据库中排序, GenderId可排序--%>
                        <f:BoundField DataField="GenderDisplay" DataToolTipField="GenderId" SortField="GenderId" Width="60" HeaderText="性别" />
                        <f:BoundField DataField="Age" DataToolTipField="Age" Width="60" HeaderText="年龄" TextAlign="right" />
                        <f:BoundField DataField="CampusName" DataToolTipField="CampusName" Width="100" HeaderText="校区" />
                        <f:BoundField DataField="SchoolName" DataToolTipField="SchoolName" Width="150" HeaderText="学校" />
                        <f:BoundField DataField="ClassName" DataToolTipField="ClassName" Width="100" HeaderText="班级" />
                        <f:BoundField DataField="Contact" DataToolTipField="Contact" Width="80" HeaderText="联系人" />
                        <f:BoundField DataField="ContactMobile" DataToolTipField="ContactMobile" Width="100" HeaderText="联系人手机" />
                        <f:BoundField DataField="Hobby" DataToolTipField="Hobby" ExpandUnusedSpace="true" HeaderText="兴趣爱好" />
                        <f:BoundField DataField="CreateUserName" DataToolTipField="CreateUserName" Width="80" HeaderText="创建人" />
                        <f:BoundField DataField="CreateTime" Width="140" HeaderText="创建时间" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_edit" Width="30" CommandName="edit" EnableLock="true" ToolTip="编辑" CommandTitle="编辑学生" Icon="TableEdit" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_delete" Width="30" CommandName="delete" EnableLock="true" ToolTip="删除" CommandTitle="删除学生" Icon="Delete" ConfirmTitle="删除学生" ConfirmText="是否删除该学生？" ConfirmTarget="Self" ConfirmIcon="Question" TextAlign="center" />
                    </Columns>
                </f:Grid>
            </Items>
        </f:Panel>
        <f:Window ID="win_edit" runat="server" OnClose="win_edit_Close" />
    </form>
</body>
</html>
